import java.util.HashMap;

class InsufficientBalanceException extends Exception {
    public InsufficientBalanceException(String message) {
        super(message);
    }
}

class InvalidAccountException extends Exception {
    public InvalidAccountException(String message) {
        super(message);
    }
}

class Account {
    private String accountNumber;
    private double balance;

    public Account(String accountNumber, double balance) {
        this.accountNumber = accountNumber;
        this.balance = balance;
    }

    public String getAccountNumber() {
        return accountNumber;
    }

    public double getBalance() {
        return balance;
    }

    public void deposit(double amount) {
        // To do
        balance += amount;
        System.out.println("Valid transaction");
    }

    public void withdraw(double amount) throws InsufficientBalanceException {
        // To do
        if (amount > balance) {
            throw new InsufficientBalanceException("Insufficient balance");
        }
        else {
            balance -= amount;
            System.out.println("Valid transaction");
        }
    }
}

class BankingSystem {
    private HashMap<String, Account> accounts;

    public BankingSystem() {
        accounts = new HashMap<>();
    }

    public void addAccount(Account account) {
        accounts.put(account.getAccountNumber(), account);
    }

    public void makeTransaction(String accountNumber, double amount) {
        // To do
        try{
            Account account = accounts.get(accountNumber);
            if (account == null) {
                throw new InvalidAccountException("Invalid account number");
            }
            account.deposit(amount);
        } catch (InvalidAccountException e) {
            System.err.println(e.getMessage());
        }
    }
}

public class Main {
    public static void main(String[] args) {
        // Create a banking system
        BankingSystem bankingSystem = new BankingSystem();

        // Create some accounts
        Account account1 = new Account("12345", 1000.0);
        Account account2 = new Account("67890", 500.0);

        // Add accounts to the banking system
        bankingSystem.addAccount(account1);
        bankingSystem.addAccount(account2);

        // Perform transactions
        bankingSystem.makeTransaction("12345", 200.0); // Valid transaction
        bankingSystem.makeTransaction("67890", 600.0); // Insufficient balance
        bankingSystem.makeTransaction("99999", 100.0); // Invalid account number
    }
}
